﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Threading.Tasks;

namespace Models {
    public class ShippingAddress {
        public long Id { get; set; }

        [Required, Column("Receiver", TypeName = "nvarchar(50)")]
        public string Receiver { get; set; }

        [Required]
        public int ProvinceId { get; set; }

        [Required]
        public int CityId { get; set; }

        [Required]
        public int AreaId { get; set; }

        [Required, Column("Address", TypeName = "nvarchar(150)")]
        public string Address { get; set; }

        [Required, Column("Phone", TypeName = "varchar(15)")]
        public string Phone { get; set; }

        [Column("IsEnable", TypeName = "bit")]
        public bool IsEnable { get; set; } = true;

        [Column("IsDefault", TypeName = "bit")]
        public bool IsDefault { get; set; } = false;

        public virtual Users Users { get; set; }
    }
}
